<extend name="Index/index"/>

<block name="box">
    <div class="view-product">
        <div class="info-center">
            <div class="manage-head">
                <h6 class="padding-left manage-head-con">{{$title}}</h6>
            </div>
        </div>
        <div class="layui-container" style="margin-top: 20px">
            <div class="layui-row">

                <div class="layui-col-md5 layui-col-md-offset1">
                    <form class="layui-form" action="{{:U('Category/addTopCategoryDo')}}" method="post">
                        <div class="layui-form-item">
                            <label class="layui-form-label">分类名称</label>
                            <div class="layui-input-inline">
                                <input type="text" name="name" required  lay-verify="required"  autocomplete="off" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">pid</label>
                            <div class="layui-input-inline">
                                <input type="text" name="pid" autocomplete="off" class="layui-input" value="0" readonly>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">path</label>
                            <div class="layui-input-inline">
                                <input type="text" name="path"  autocomplete="off" class="layui-input" value="0," readonly>
                            </div>
                        </div>


                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit >立即提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </div>
    <script>
        //Demo
        layui.use('form', function(){
            var form = layui.form;

            //监听提交
            form.on('submit(formDemo)', function(data){
                layer.msg(JSON.stringify(data.field));
                return false;
            });
        });
    </script>
</block>